<?php
/**
 * 地区对照表
 * User: yuanxuncheng
 * Date: 2016-12-21
 * Time: 22:39
 */

namespace app\api\model\dao;

use think\Model;
use think\Db;

class Region extends Model
{
    //set talbename
    protected $table = 'region';
    //set primary key
    protected $pk = 'region_id';

    /**
     * @desc 获取地区对照表
     * @return false|\PDOStatement|string|\think\Collection
     */
    public function getRegion($region_id)
    {
        $conds = [
            'region_id' => ['in', $region_id]
        ];
        $field = '*';
        return $this->where($conds)->field($field)->select();
    }
}
